package com.geekgo.web;

import com.geekgo.method.RequestToModelUtil;
import com.geekgo.method.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author HeHaoyang
 * @version 2016/6/13 18:44
 */
@RestController
public class UserController {

    @RequestMapping("/login")
    public String login(HttpServletRequest request){
        User user = RequestToModelUtil.convert(User.class,request);
        System.out.println(user);
        return "hello";
    }
}
